<?php
/**
 * @version		$Id: view.html.php 20196 2011-01-09 02:40:25Z ian $
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access
defined('_JEXEC') or die;

jimport('joomla.application.component.view');

/**
 * HTML Article View class for the Content component
 *
 * @package		Joomla.Site
 * @subpackage	com_content
 * @since		1.5
 */
class KCaptchaViewKCaptcha extends JView
{
	function display($tpl = null)
	{	
		$session = JFactory::getSession();
		$session->set('kcaptcha', null);
		
		JRequest::setVar('tmpl', 'component');
		
		require_once JPATH_COMPONENT_SITE . DS . 'kcaptcha' . DS . 'kcaptcha.php';
		
		$captcha = new KCAPTCHA();
		
		if(JRequest::get(session_name()))
		{
			$session->set('kcaptcha', $captcha->getKeyString());
		}
		
		exit();
	}
}
